/**
 * Demo.java is created by Zachariah at 2012-1-17 下午03:17:25
 */
package com.zack.designPattern.adapter.object;

/**
 * @author zachariah zzcfrog@gmail.com
 *
 */
public class Demo {

	/**
	 *
	 * @author zachariah
	 * @param args
	 */
	public static void main(String[] args) {
		Child child = new Child();
		
		IDuck duck = new Duck();
		child.play(duck);
		
		//想往橡皮鸭子怎么办？
		IRobberDuck robberDuck = new RobberDuck();
		IDuck robberDuckAdapter = new RobberDuckAdapter(robberDuck);
		child.play(robberDuckAdapter);

	}

}
